const Mock = require("mockjs");

const data = Mock.mock({
    "list|100-300": [{
        housingName: "八维",
        area: "@county()",
        detailAddress: Mock.mock("@county(true)"),
        "housetype|1": ["3室两厅2卫1厨", "2室1厅", "1室1厅"],
        "houseArea|1": ["150㎡", "100㎡", "120㎡"],
        "sellingprice|100-1000": 1,
        "floor|1-33": 1, // 楼层
        "allFloor|33": 1,
        "orientation|1": ["南", "东", "西", "北", "东北", "西北", "东南", "西南"],
        "fitment|1": ["精装", "毛坯", "豪装", "奢装", "简装"],
        "fitmentType|1": ["叙利亚", "北欧", "中式", "美式"],
        "houseAssort|1": [
            "电视",
            "空调",
            "洗衣机",
            "热水器",
            "沙发",
            "阳台",
            "床",
            "衣柜",
        ],
        "Speciallabel|1": ["近地铁", "临近医院", "有商场", "学区房"],
        img: "https://unsplash.it/400/600/?@name",
        listingTitle: "@ctitle(3,7)",
        "contacts|1": ["张三", "李四", "王五", "赵六", "冯七"],
        phone: /^(?:(?:\+|00)86)?1\d{10}$/,
        termValidity: "7天",
        listingDesc: "不错",
        "classifyType|1-6": 1,
        "pv|10-1000": 1,
        "isShow|+1": ["1", "0"],
        "ids|+1": [36, 59],
    }, ],
});

const groupData = Mock.mock({
    "list|100-300": [{
        floorName: "@ctitle(3,6)",
        floorAddress: "@county(true)",
        name: "@cname",
        date: "@date",
        "status|+1": ["已开团", "未开团"],
        img: "https://unsplash.it/400/600/?@name",
    }, ],
});

const liveData = Mock.mock({
    "list|50-150": [{
        name: "@cname",
        date: "@date",
        title: "@ctitle",
        img: "https://unsplash.it/400/600/?@name",
        "live|+1": ["1", "2", "0"],
    }, ],
});

module.exports = {
    data: data.list,
    groupData: groupData.list,
    liveData: liveData.list,
};